home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / adialr / namein.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-05-08  |  4.3 KB  |  137 lines

  1. VERSION 2.00
  2. Begin Form NameIn 
  3.    BorderStyle     =   3  'Fixed Double
  4.    Caption         =   "Input Name"
  5.    ClientHeight    =   1635
  6.    ClientLeft      =   3750
  7.    ClientTop       =   4815
  8.    ClientWidth     =   4590
  9.    Height          =   2040
  10.    Left            =   3690
  11.    LinkMode        =   1  'Source
  12.    LinkTopic       =   "Form2"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   1635
  16.    ScaleWidth      =   4590
  17.    Top             =   4470
  18.    Width           =   4710
  19.    Begin CommandButton CancelBut 
  20.       Cancel          =   -1  'True
  21.       Caption         =   "Cancel"
  22.       FontBold        =   -1  'True
  23.       FontItalic      =   0   'False
  24.       FontName        =   "MS Sans Serif"
  25.       FontSize        =   9.75
  26.       FontStrikethru  =   0   'False
  27.       FontUnderline   =   0   'False
  28.       Height          =   495
  29.       Left            =   2475
  30.       TabIndex        =   5
  31.       Top             =   1050
  32.       Width           =   1335
  33.    End
  34.    Begin CommandButton OKBut 
  35.       Caption         =   "Enter"
  36.       Default         =   -1  'True
  37.       FontBold        =   -1  'True
  38.       FontItalic      =   0   'False
  39.       FontName        =   "MS Sans Serif"
  40.       FontSize        =   9.75
  41.       FontStrikethru  =   0   'False
  42.       FontUnderline   =   0   'False
  43.       Height          =   495
  44.       Left            =   825
  45.       TabIndex        =   4
  46.       Top             =   1050
  47.       Width           =   1335
  48.    End
  49.    Begin TextBox NumberInTxt 
  50.       FontBold        =   -1  'True
  51.       FontItalic      =   0   'False
  52.       FontName        =   "MS Sans Serif"
  53.       FontSize        =   9.75
  54.       FontStrikethru  =   0   'False
  55.       FontUnderline   =   0   'False
  56.       Height          =   405
  57.       Left            =   1050
  58.       TabIndex        =   3
  59.       Top             =   525
  60.       Width           =   3375
  61.    End
  62.    Begin TextBox NameInTxt 
  63.       FontBold        =   -1  'True
  64.       FontItalic      =   0   'False
  65.       FontName        =   "MS Sans Serif"
  66.       FontSize        =   9.75
  67.       FontStrikethru  =   0   'False
  68.       FontUnderline   =   0   'False
  69.       Height          =   390
  70.       Left            =   1050
  71.       TabIndex        =   2
  72.       Top             =   75
  73.       Width           =   3375
  74.    End
  75.    Begin Label Label2 
  76.       Caption         =   "Number"
  77.       FontBold        =   -1  'True
  78.       FontItalic      =   0   'False
  79.       FontName        =   "MS Sans Serif"
  80.       FontSize        =   9.75
  81.       FontStrikethru  =   0   'False
  82.       FontUnderline   =   0   'False
  83.       Height          =   300
  84.       Left            =   75
  85.       TabIndex        =   1
  86.       Top             =   600
  87.       Width           =   870
  88.    End
  89.    Begin Label Label1 
  90.       Caption         =   "Name"
  91.       FontBold        =   -1  'True
  92.       FontItalic      =   0   'False
  93.       FontName        =   "MS Sans Serif"
  94.       FontSize        =   9.75
  95.       FontStrikethru  =   0   'False
  96.       FontUnderline   =   0   'False
  97.       Height          =   255
  98.       Left            =   120
  99.       TabIndex        =   0
  100.       Top             =   120
  101.       Width           =   705
  102.    End
  103. Sub CancelBut_Click ()
  104.     NameIn.Hide
  105.     NameInTxt.Text = ""
  106.     NumberInTxt.Text = ""
  107. End Sub
  108. Sub OKBut_Click ()
  109. 'Check for entered name and number
  110.     If NameInTxt.Text = "" Then
  111.         MsgBox "No Name specified"
  112.         Exit Sub
  113.     ElseIf NumberInTxt.Text = "" Then
  114.         MsgBox "No Number specified"
  115.         Exit Sub
  116.     End If
  117. 'Adjust spacing of telephone numbers
  118.     NumLen% = Len(NumberInTxt.Text)
  119.     If NumLen% >= 3 And NumLen% < 6 Then
  120.         NumTxt$ = "     " + NumberInTxt.Text
  121.     ElseIf NumLen% = 6 Then
  122.         NumTxt$ = "   " + NumberInTxt.Text
  123.     Else NumTxt$ = NumberInTxt.Text
  124.     End If
  125. 'Add spaces for correct trimming of NameNumTxt$
  126.     NameNumTxt$ = NameInTxt.Text + "         " + NumTxt$
  127. 'Clear the name and number
  128.     NumberInTxt.Text = ""
  129.     NameInTxt.Text = ""
  130. 'Delete the previous names and numbers with delete Sub Procedure
  131.     DelNamIni
  132. 'Add the new name to the list box
  133.     TeleList.TeleListBox.AddItem NameNumTxt$
  134. 'Then write new Names and Numbers from the listbox to ADIALER.INI with Sub Procedure
  135.     UpdateNamIni
  136. End Sub
  137.